import React, {Component} from 'react';
import './index.less';
import {base, high} from 'nc-lightapp-front';
import RosterTable from "../RosterTable";

const {NCModal, NCButton} = base;
const {Header: NCModalHeader, Body: NCModalBody} = NCModal;

class RosterModal extends Component {
    constructor(props) {
        super(props);
        this.closeModal = this.closeModal.bind(this);
    }

    closeModal() {
        this.props.onClose && this.props.onClose();
    }

    render() {
        const {visible} = this.props;
        return (
            <NCModal
                show={visible}
                size="xlg"
                onHide={this.closeModal}
                backdrop={'static'}
            >
                <NCModalHeader closeButton={true}>
                    {this.props.json['hi6007-000016']}{/* 国际化处理： 花名册报表*/}
                </NCModalHeader>
                <NCModalBody>
                    <RosterTable {...this.props} />
                </NCModalBody>
            </NCModal>
        );
    }
}

export default RosterModal;
